package com.myblog.myblog.service;

import com.myblog.myblog.poge.Blog;
import com.myblog.myblog.vo.BlogQuery;
import com.myblog.myblog.vo.TagQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface  AdminBlogService {
    Blog getBlog(Long id);  //根据ID查询

    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);  //分页查询

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlogTag(Pageable pageable, TagQuery tagQuery);

    Page<Blog> listBlog(String query,Pageable pageable);

    List<Blog> listBlogTop(Integer size);

    Blog saveBlog(Blog blog); //新增

    Blog updateBlog(Long id,Blog blog);  //修改

    void deleteBlog(Long id);  //删除


    Map<String,List<Blog>> archiveBlog();

    Long countBlog();
}
